<template>
	<view class="navigation-layout">
		<view class="btn" @click="toAncestralHall()">家族祠堂</view>
		<view class="btn" @click="toAncestralAlbum()">家族相册</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	props: {
		ancestralHallId: {
			type: Number,
			default: undefined
		},
		surname: {
			type: String,
			default: undefined
		},
		role: {
			type: Number,
			default: -1
		}
	},
	methods: {
		/* 跳转家族祠堂页面 */
		toAncestralHall() {
			uni.navigateTo({
				url: '/ancestral/pages/detail/ancestral-hall-detail?id=' + this.ancestralHallId + '&surname=' + this.surname
			});
		},
		/* 跳转家族相册页面 */
		toAncestralAlbum() {
			uni.navigateTo({
				url: '/ancestral/pages/genealogy/ancestral-hall-album-group?ancestralHallId=' + this.ancestralHallId + '&surname=' + this.surname + '&role=' + this.role
			});
		}
	}
};
</script>

<style lang="scss" scoped>
@import './navigation.scss';
</style>
